A connector assembly includes a body and a plug detachably mounted on the body. The body includes a hook. The plug includes a housing, a plurality of pins mounted on the housing, and a groove defined on the housing. The hook is engaged with the groove to secure the plug in the body.